home *** CD-ROM | disk | FTP | other *** search
/ Mac Mania 6 / MacMania 6.toast / / Multimedia & Desktop / sk8 / SK8InJava / Code / Devices / Mouse.java < prev    next >
Encoding:
Java Source  |  1997-02-27  |  722 b   |  45 lines  |  [TEXT/CWIE]

  1. /*  SK8 © 1997 Apple Computer, Inc.
  2.     This code is protected under the current SK8 License
  3.     See http://sk8.research.apple.com/ for more information
  4.     Apple Research Laboratories
  5. */
  6.  
  7.  
  8. import java.awt.*;
  9.  
  10. class Mouse {
  11.     public static int x = 0, y = 0;
  12.     public static boolean button = false;
  13.     
  14.     public static int x() {
  15.         return x;
  16.     }
  17.     
  18.     public static int y() {
  19.         return y;
  20.     }
  21.     public static int h() {
  22.         return x;
  23.     }
  24.     
  25.     public static int v() {
  26.         return y;
  27.     }
  28.     
  29.     public static boolean up() {
  30.         return (button == false);
  31.     }
  32.     
  33.     public static boolean down() {
  34.         return (button == true);
  35.     }
  36.     
  37.     public static Point location() {
  38.         return new Point(x, y);
  39.     }
  40.     public static list locationlist() {
  41.         return sk8.list(x, y);
  42.     }
  43. }
  44.  
  45.